package com.hutu.comment.adaptor;

import com.hutu.comment.domain.TbComment;
import com.hutu.comment.domain.dto.CommentDto;
import lombok.Data;

@Data
public class CommentDtoAdaptor {
    public static CommentDto toCommentDto(TbComment tbComment){
        CommentDto commentDto = new CommentDto();
        commentDto.setId(tbComment.getId());
        commentDto.setQuestionId(tbComment.getQuestionId());
        commentDto.setReplyId(tbComment.getReplyId());
        commentDto.setCreateTime(tbComment.getCreateTime());
        commentDto.setCreateUser(tbComment.getCreateUser());
        return commentDto;
    }
}
